<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\validate;

/**
 * 友情链接验证器
 */
class Kitchen extends AdminBase
{
    
    // 验证规则
    protected $rule =   [
        
        'o_id'              => 'require|unique:kitchen',
        'name'               => 'require',
        'table_id'               => 'require|number',
        'copies'              => 'require|number',
    ];

    // 验证提示
    protected $message  =   [
        
        'o_id.require'              => '单号不能为空',
        'o_id.unique'               => '单号已存在',
        'name.require'               => '菜品不能为空',
        'table_id.require'              => '桌号不能为空',
        'table_id.number'               => '桌号为数字',
        'copies.require'              => '份数不能为空',
        'copies.number'               => '份数为数字'
    ];

    // 应用场景
    protected $scene = [
        
        'edit' =>  ['o_id','name','table_id','copies'],
    ];
    
}
